<?php

namespace Schedule\Model;

use Think\Model\RelationModel;

class CompanyCourseModel extends RelationModel {

    //定义主表
    protected $tableName = 'company_course';
    //定义关联关系
    protected $_link = array(
        'lessons' => array(
            'mapping_type' => self::HAS_MANY,
            'mapping_name' => 'lessons',
            'class_name' => 'company_lesson',
            'foreign_key' => 'course_id',
        ),
    );

}
